#! /bin/bash



total=31;
a=7;
b=24;

for exe in  1d-gs-3p
do
    rm  result/$exe.txt
    for index in `seq $a $b`;
    do 
    nx=$((2 ** $index))
    t=$((2 ** ($total - $index)))
    ../$exe/exe-$exe $nx $t |grep GS>> result/$exe.txt 
    done
done

echo -e "size\tscalar\tour\tour\tspeedup\tspeedup" > result/$exe.data.txt
cat result/1d-gs-3p.txt|tr "," "=" | awk -F "= " '{print $3 "\t" $NF}'|paste - - -|awk '{print $1"\t" $2"\t" $4"\t" $6"\t"$4/$2"\t"$6/$2}' >> result/1d-gs-3p.data.txt
